package org.jluzhCS.mylogin.service;

import java.util.ArrayList;
import java.util.List;

import org.jluzhCS.mylogin.domain.Book;



public class BookService 
{
	 static List<Book> bookDb;
	 
	 static
	 {
		 bookDb =new ArrayList<>();
		 bookDb.add(new Book(1,"Java","YongJunhai","¥45"));
	 }

	public ArrayList<Book> getAllBook() 
	{
		ArrayList<Book> b=new ArrayList<Book>();
		for(Book u:bookDb)
		{
			b.add(u);
		} 
		return b;
	}

	public void save(Book book) 
	{
		bookDb.add(book);
	}


	 
}
